<%@page pageEncoding="UTF-8" %><?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<%
org.sysmo.server.SysmoServer server = (org.sysmo.server.SysmoServer)application.getAttribute("sysmoServer");
%>
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />

    <link rel="stylesheet" media="screen,projection" type="text/css" href="css/reset.css" />
    <link rel="stylesheet" media="screen,projection" type="text/css" href="css/main.css" />
    <!--[if lte IE 6]><link rel="stylesheet" type="text/css" href="css/main-msie.css" /><![endif]-->
    <link rel="stylesheet" media="screen,projection" type="text/css" href="css/style.css" />
    <%--<link rel="stylesheet" media="print" type="text/css" href="css/print.css" />--%>

    <title>新增客户端 - sysmo</title>
    <script src="js/util.js" type="text/javascript"></script>
    <script type="text/javascript">
        <!--
        function newNode(id, oldName) {
            var name;
            do {
                name = prompt("设置新节点别名并加入监控列表：", oldName);
                if (name == null) {
                    break;
                }
                if (name != "") {
                    window.location = "AddNode.do?id=" + id + "&name=" + UrlEncode(name);
                } else {
                    alert("请输入节点名");
                }
            } while (name == "");
        }
        -->
    </script>
</head>

<body>

<div id="main">

    <!-- Header -->
    <div id="header">
    
        <p id="logo">sysmo</p>
        
        <div id="slogan">A distributed system monitor tool</div>
    
    </div> <!-- /header -->
    
    <hr class="noscreen" />
    
    <!-- Navigation -->
    <div id="nav" class="box">
    
        <ul>
            <li class=""><a href="AllNodes.do">监控列表</a></li>
            <li class="active"><a href="NewNodes.do">新增客户端</a></li>
            <li class=""><a href="Users.do">用户管理</a></li>
            <li class=""><a href="Logout.do">退出登录(<%= ((org.sysmo.server.user.User)session.getAttribute("user")).getName() %>)</a></li>
        </ul>
    
    </div> <!-- /nav -->
    
    <hr class="noscreen" />
    
    <!-- Columns -->
    <div id="cols">
        <div id="cols-in" class="box">
    
            <!-- Content -->
            <div id="content">
                
                <h2 class="title-01">单击客户端名称将其加入监控列表</h2>
                
                <div class="in">
                
                    <!-- Topstory -->
                    <div class="box">
                        <div id="topstory-txt">
                            <table class="main_table">
                            <%
                            java.util.List<org.sysmo.server.node.NewNode> nodes = server.getAllNewNodes();
                            for (int i = 0; i < nodes.size(); i++) {
                                org.sysmo.server.node.NewNode node = nodes.get(i);
                            %>
                                <tr>
                                    <td><a href="javascript:newNode(<%= i %>, '<%= org.sysmo.server.util.UtilHelper.encodeJSString(node.getName()) %>')"><%= node.getName() %></a></td>
                                </tr>
                            <%
                            }
                            %>
                            </table>
                            <p>新客户端数：<%= nodes.size() %></p>
                        </div> <!-- /topstory-txt -->
                        
                    </div> <!-- /box -->
                
                </div> <!-- /in -->
                
            </div> <!-- /content -->

            <hr class="noscreen" />

            <!-- Aside -->
            <div id="aside">

                <h4 class="title-03">操作流程</h4>
                
                <div class="in">
                    <ul id="subnav">
                        <li><a href="#">部署客户端程序和配置文件</a></li>
                        <li><a href="NewNodes.do">单击此处将新客户端加入监控列表</a></li>
                        <li><a href="#">创建监控项、图表项和监控值</a></li>
                        <li><a href="#">配置监控项、上传数据采集程序</a></li>
                        <li><a href="#">查看图表，获取最新数据</a></li>
                        <%--<li><a href="#">Lorem ipsum sit amet</a></li>
                        <li><a href="#">Lorem ipsum sit amet</a></li>
                        <li class="active"><a href="#">Lorem ipsum sit amet</a></li>
                        <li><a href="#">Lorem ipsum sit amet</a></li>
                        <li><a href="#">Lorem ipsum sit amet</a></li>
                        <li class="last"><a href="#">Lorem ipsum sit amet</a></li>--%>
                    </ul>

                </div> <!-- /in -->

            </div> <!-- /aside -->
            
        </div> <!-- /cols-in -->
    </div> <!-- /cols -->

    <hr class="noscreen" />
    
    <!-- Footer -->
    <div id="footer" class="box">
        
        <p class="f-left"><a href="http://sysmo.googlecode.com">sysmo @ GoogleCode</a></p>

    </div> <!-- /box -->

</div> <!-- /main -->

<!-- Do you want remove this backlinks? Look at www.nuviotemplates.com/payment.php -->
<p id="copy"><a href="http://www.nuviotemplates.com/">Free web templates</a> presented by <a href="http://www.qartin.cz/">QARTIN</a> &ndash; Our tip: <a href="http://www.thinline.cz/">Webdesign</a>, <a href="http://www.cesky-hosting.cz/">Webhosting</a></p>
<!-- Do you want remove this backlinks? Look at www.nuviotemplates.com/payment.php -->

</body>
</html>
